<?php

class Yamarket_Model_Offer{
    public $Publish;
    public $Id;
    public $NodeId;
    public $Bid;
	public $Cid;
    public $Price;
    public $CurrencyId;
	public $CategoryId;
    public $TypePrefix;
    public $Vendor;
    public $VendorCode;
    public $Model;
    public $Store;
    public $Pickup;
    public $Delivery;
    public $Description;
    public $LocalDeliveryCost;
    public $Available;
    public $SalesNotes;
    public $ManufacturerWarranty;
    public $CountryOfOrigin;
    
    public function __construct($options = null){
        if ($options instanceof Yamarket_Model_Offer)
    	{
    		$options = $options->toArray();
    		$this->setOptions($options);
    	}
        else if (is_array($options)) {
            $this->setOptions($options);
        }
    }
    
    public function setOptions(array $options){
        $methods = get_class_methods($this);
        foreach ($options as $key => $value) {
            $method = 'set' . ucfirst($key);
            if (in_array($method, $methods)) {
                $this->$method($value);
            }
        }
        return $this;
    }
    
    public function toArray(){
    	$vars = get_class_vars(get_class($this));
        foreach ($vars as $var=>$value)
        {
        		$vars[$var] = $this->$var;
        }
        return $vars;
    }
    
    public function getPublish(){return $this->Publish;}
    public function getId(){return $this->Id;}
    public function getNodeId(){return $this->NodeId;}
    public function getBid(){return $this->Bid;}
	public function getCid(){return $this->Cid;}
    public function getPrice(){return $this->Price;}
    public function getCurrencyId(){return $this->CurrencyId;}
    public function getCategoryId(){return $this->CategoryId;}
    public function getTypePrefix(){return $this->TypePrefix;}
    public function getVendor(){return $this->Vendor;}
    public function getVendorCode(){return $this->VendorCode;}
    public function getModel(){return $this->Model;}
    public function getStore(){return $this->Store;}
    public function getPickup(){return $this->Pickup;}
    public function getDelivery(){return $this->Delivery;}
    public function getDescription(){return $this->Description;}
    public function getLocalDeliveryCost(){return $this->LocalDeliveryCost;}
    public function getAvailable(){return $this->Available;}
    public function getSalesNotes(){return $this->SalesNotes;}
    public function getManufacturerWarranty(){return $this->ManufacturerWarranty;}
    public function getCountryOfOrigin(){return $this->CountryOfOrigin;}
    
    public function setPublish($v){$this->Publish=$v; return $this;}
    public function setId($v){$this->Id=$v; return $this;}
    public function setNodeId($v){$this->NodeId=$v; return $this;}
    public function setBid($v){$this->Bid = $v; return $this;}
	public function setCid($v){$this->Cid = $v; return $this;}
    public function setPrice($v){$this->Price=$v; return $this;}
    public function setCurrencyId($v){$this->CurrencyId=$v; return $this;}
    public function setCategoryId($v){$this->CategoryId=$v; return $this;}
    public function setTypePrefix($v){$this->TypePrefix=$v; return $this;}
    public function setVendor($v){$this->Vendor=$v; return $this;}
    public function setVendorCode($v){$this->VendorCode=$v; return $this;}
    public function setModel($v){$this->Model=$v; return $this;}
    public function setStore($v){$this->Store=$v; return $this;}
    public function setPickup($v){$this->Pickup=$v; return $this;}
    public function setDelivery($v){$this->Delivery=$v; return $this;}
    public function setDescription($v){$this->Description=$v; return $this;}
    public function setLocalDeliveryCost($v){$this->LocalDeliveryCost=$v; return $this;}
    public function setAvailable($v){$this->Available=$v; return $this;}
    public function setSalesNotes($v){$this->SalesNotes=$v; return $this;}
    public function setManufacturerWarranty($v){$this->ManufacturerWarranty=$v; return $this;}
    public function setCountryOfOrigin($v){$this->CountryOfOrigin=$v; return $this;}
}
?>
